/**
 * 应用入口文件
 * 
 * React应用的启动入口
 */

import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'

// 确保DOM已加载
const rootElement = document.getElementById('root')

if (!rootElement) {
  throw new Error('Root element not found. Make sure you have a div with id="root" in your HTML.')
}

// 创建React根节点并渲染应用
const root = ReactDOM.createRoot(rootElement)

root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
)
